package com.ruoyi.equip.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProbeData  extends BaseEntity {
    @TableId("data_id")
    private Long dataId;
    @ApiModelProperty(value = "收发机逻辑ID")
    @TableField("device_id")
    private String deviceId;

    @ApiModelProperty(value = "探头逻辑ID")
    @TableField("tag_id")
    private String tagId;


    @ApiModelProperty(value = "探头逻辑ID")
    @TableField("sb_id")
    private String sbId;

    @ApiModelProperty(value = "探头类型")
    @TableField("measure_type")
    private Integer measureType;

    @ApiModelProperty(value = "探头数据")
    @TableField("report_data")
    private String reportData;


    @ApiModelProperty(value = "告警类型")
    @TableField("notice_type_code")
    private int noticeTypeCode;

    @ApiModelProperty(value = "告警类型")
    @TableField("notice_type")
    private String noticeType;

    @ApiModelProperty(value = "上报时间")
    @TableField("report_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date reportTime;

    @ApiModelProperty(value = "记录时刻用户组ID")
    @TableField("dept_id")
    private String deptId;


    @ApiModelProperty(value = "记录时刻用户ID")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "告警处理 0 -未确认 1-已确认")
    @TableField("opt")
    private int opt=0;


    @ApiModelProperty(value = "告警状态  1-告警中 2-已恢复 3-已确认")
    @TableField("state")
    private int state=1;



    public ProbeData(Long dataId, String deviceId, String tagId, String sbId, Integer measureType, String reportData, int noticeTypeCode, String noticeType, Date reportTime, String deptId, String userId) {
        this.dataId = dataId;
        this.deviceId = deviceId;
        this.tagId = tagId;
        this.sbId = sbId;
        this.measureType = measureType;
        this.reportData = reportData;
        this.noticeTypeCode = noticeTypeCode;
        this.noticeType = noticeType;
        this.reportTime = reportTime;
        this.deptId = deptId;
        this.userId = userId;
    }
}
